<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page import="java.io.*" %>
<%    
	String txt = (String)request.getAttribute("txt");
    response.setContentType("application/txt");
    response.setHeader("Content-disposition", "attachment;filename=" + request.getAttribute("fileName"));
    BufferedOutputStream bos = null;
    try{
	    bos = new BufferedOutputStream(response.getOutputStream());
	    bos.write(txt.getBytes());
    }catch(IOException e){
    	throw e;
    }finally{
    	if (bos != null)
    		bos.close();
    }    
%>



